package udpTest;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetSocketAddress;

public class Server {

	public static void main(String[] args) throws Exception {
		DatagramSocket socket = new DatagramSocket(8888);

		byte[] data = new byte[1024 * 60];
		DatagramPacket packet = new DatagramPacket(data, data.length);

		socket.receive(packet);

		System.out.println(new String(packet.getData()));

		socket.close();

//		DatagramSocket socket = new DatagramSocket(888);
//
////		DatagramPacket p = new DatagramPacket(buf, length, new InetSocketAddress("", port))
//		byte[] buf = new byte[1024 * 60];
//		DatagramPacket p = new DatagramPacket(buf, buf.length);
//
//		socket.receive(p);
//
////		p.getData()
//
//		System.out.println(new String(p.getData()));
//
//		socket.close();
	}

}
